#ifndef _DOSS_H_
#define _DOSS_H_

#ifndef NULL
#define NULL 0
#endif

typedef struct  
{
	int l, t, r, b;
} RECT;

typedef enum {
	CMD_NOTIFY, CMD_UPDATE, CMD_UPDATE_FRAME, CMD_NOTIFY_ADVISE_LAYOUT, 
} COMMAND_E;
typedef enum {
	E_IMMOVABLE, E_MOVABLE,
} RATIO_WH_E;
typedef enum {
	LINE_IN, LINE_ON, LINE_OUT
} LINESTYLE_E;
typedef enum {
	LO_NN, LO_NM2, LO_NM
} LAYOUT_E;

typedef void(FUNC_CB)(int, void* );

typedef struct 
{
	int clientX, clientY;
	RATIO_WH_E type;
	int x, y;
	LAYOUT_E layout_type;
	int xNum;
	int yNum;

	FUNC_CB* notify_cb;
} PROFILE_T;

typedef struct 
{
	int margin_l, margin_r, margin_t, margin_b; // Margings 
	int padding_l, padding_r, padding_t, padding_b; // Paddings
	int line_width;
	LINESTYLE_E line_style; 
} Style_t;

typedef struct 
{
	int idFrame;  // id of frame
	RECT rect;	// rect

} FRAMEDISPLAY_T;


int initLayout(PROFILE_T& profile, Style_t& style, FUNC_CB* fn);
int setLayout(int , int , RATIO_WH_E );
int updateClientArea(int x, int y);
int hitTest(int x, int y);


#endif // _DOSS_H_

